package com.iqiao.platform.dao;

import com.iqiao.common.base.BaseDao;
import com.iqiao.platform.model.Admin;
import org.springframework.stereotype.Repository;

@Repository
public class AdminDao extends BaseDao<Admin, Long> {

    @Override
    public Class getEntityClass() {
        return this.getClass();
    }

    public Admin findByUsername(String username) {
        return super.getUnique("findByUsername", username);
    }

    public Admin findByUserId(Long userId) {
        return super.getUnique("findByUserId", userId);
    }
}
